package edu.ec.java02.group02.domain;

import java.io.Serializable;
import javax.persistence.*;

@Table(name = "order_detail")
public class OrderDetail implements Serializable {
    @Id
    @Column(name = "order_detail_id")
    private Integer orderDetailId;

    @Column(name = "order_no")
    private String orderNo;

    @Column(name = "product_id")
    private Integer productId;

    @Column(name = "product_name")
    private String productName;

    @Column(name = "user_id")
    private Integer userId;

    @Column(name = "product_number")
    private Integer productNumber;

    @Column(name = "product_totalprice")
    private Double productTotalprice;

    private static final long serialVersionUID = 1L;

    /**
     * @return order_detail_id
     */
    public Integer getOrderDetailId() {
        return orderDetailId;
    }

    /**
     * @param orderDetailId
     */
    public void setOrderDetailId(Integer orderDetailId) {
        this.orderDetailId = orderDetailId;
    }

    /**
     * @return order_no
     */
    public String getOrderNo() {
        return orderNo;
    }

    /**
     * @param orderNo
     */
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo == null ? null : orderNo.trim();
    }

    /**
     * @return product_id
     */
    public Integer getProductId() {
        return productId;
    }

    /**
     * @param productId
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    /**
     * @return product_name
     */
    public String getProductName() {
        return productName;
    }

    /**
     * @param productName
     */
    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    /**
     * @return user_id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * @param userId
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * @return product_number
     */
    public Integer getProductNumber() {
        return productNumber;
    }

    /**
     * @param productNumber
     */
    public void setProductNumber(Integer productNumber) {
        this.productNumber = productNumber;
    }

    /**
     * @return product_totalprice
     */
    public Double getProductTotalprice() {
        return productTotalprice;
    }

    /**
     * @param productTotalprice
     */
    public void setProductTotalprice(Double productTotalprice) {
        this.productTotalprice = productTotalprice;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orderDetailId=").append(orderDetailId);
        sb.append(", orderNo=").append(orderNo);
        sb.append(", productId=").append(productId);
        sb.append(", productName=").append(productName);
        sb.append(", userId=").append(userId);
        sb.append(", productNumber=").append(productNumber);
        sb.append(", productTotalprice=").append(productTotalprice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}